﻿using System;

namespace ToyChat
{
    /// <summary>
    /// This bitfield defines which functions are enabled
    /// </summary>
    [Flags]
    public enum PermissionFlags : long
    {
        /// <summary>
        /// No permissions
        /// </summary>
        None = 0,

        /// <summary>
        /// Specifies if the broadcast feature is enabled (used to send messages to ALL users)
        /// </summary>
        CanBroadcast = 1,

        /// <summary>
        /// Specifies if the unicast feature is enabled (used to send messages directly to a single user)
        /// </summary>
        CanUnicast = 2,

        /// <summary>
        /// Specifies if the multicast feature is enabled (used to send messages to ALL channels, but not all users)
        /// </summary>
        CanMulticast = 4,

        /// <summary>
        /// Specifies if the user is allowed to create channels
        /// </summary>
        CreateChannel = 8,

        /// <summary>
        /// Specifies if the user is allowed to delete channels
        /// </summary>
        DeleteChannel = 16,

        /// <summary>
        /// Specifies ALL permissions (-1L)
        /// </summary>
        All = -1L,
    }
}